CFLAGS = -c -Wall -g -pg -std=c99
LFLAGS = -lm -lSDL -pg
SOURCES = main.c at.c board.c display.c load.c player.c snarl.c fps.c
OBJ = $(SOURCES:.c=.o)
CC = gcc
EXE = snarl

all: $(EXE) $(SOURCES)

$(EXE): $(OBJ)
	$(CC) $(OBJ) $(LFLAGS) -o $@

.c.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	rm -rf *.o *~

purge:
	rm -rf *.o *~ $(EXE)
